<?php
require_once '../sever/json.php';
require_once '../sever/dbhelper.php';

$pdo=DB::getInstance()->connect();

//1 查询
//1)使用query
$stmt = $pdo->query("SELECT * FROM `news_type`WHERE state=1");
//$row = $stmt->fetch(); //从结果集中获取下一行，用于while循环
$data = $stmt->fetchAll(); //获取所有
//
Responce::json('200','success',$data);